<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'llicencia-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Els camps amb <span class="required">*</span> són requerits.</p>

	<?php echo $form->errorSummary($model); ?>

    <?php
    /*
	<div class="row">
		<?php echo $form->labelEx($model,'dataExpedicio'); ?>
		<?php echo $form->textField($model,'dataExpedicio'); ?>
		<?php echo $form->error($model,'dataExpedicio'); ?>
	</div>
     * 
     */
    ?>
    
    <div class="row">
        <?php echo $form->labelEx($model,'dataExpedicio'); ?>
        <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'model'=>$model,
            'language'=>'ca',
            'attribute'=>'dataExpedicio',
            'value'=>$model->dataExpedicio,
            // additional javascript options for the date picker plugin
            'options'=>array(
                'showAnim'=>'fold',
                'showButtonPanel'=>true,
                'autoSize'=>true,
                'dateFormat'=>'dd/mm/yy',
                'defaultDate'=>$model->dataExpedicio,
                //'buttonImage'=>Yii::app()->baseUrl.'/images/icons/calendari.png',
                'buttonImageOnly'=>true,
                'buttonText'=>'Triar data',
                'selectOtherMonths'=>true,
                //'showOn'=>'button',
                'showOtherMonths'=>true,
                'changeMonth'=>'true',
                'changeYear'=>'true,'
            ),
        ));
        ?>
        <?php echo $form->error($model,'dataExpedicio'); ?>
    </div>

    <?php
    /*
	<div class="row">
		<?php echo $form->labelEx($model,'idEsportista'); ?>
		<?php echo $form->textField($model,'idEsportista'); ?>
		<?php echo $form->error($model,'idEsportista'); ?>
	</div>
     * 
     */
    ?>
    
    <div class="row">
		<?php echo $form->labelEx($model,'idEsportista'); ?>
        <?php echo $form->dropDownList($model, 'idEsportista',
            CHtml::listData(Esportista::model()->findAll(array('order'=> 'cognoms')), 'idEsportista', 'nomDataCodi'),
                array('prompt'=>'(Tria un esportista)'));?>
        <?php echo $form->error($model,'idEsportista'); ?>
	</div>

    <?php
    /*
	<div class="row">
		<?php echo $form->labelEx($model,'idClub'); ?>
		<?php echo $form->textField($model,'idClub'); ?>
		<?php echo $form->error($model,'idClub'); ?>
	</div>
     * 
     */
    ?>
    
    <?php
    /*
    <div class="row">
		<?php echo $form->labelEx($model,'idClub'); ?>
        <?php echo $form->dropDownList($model, 'idClub',
            CHtml::listData(Club::model()->findAll(array('order'=> 'nom')), 'idClub', 'nom'),
                array('prompt'=>'(Tria un club)'));?>
        <?php echo $form->error($model,'idClub'); ?>
	</div>
     * 
     */
    ?>

    <?php
    /*
	<div class="row">
		<?php echo $form->labelEx($model,'idTipusLlicencia'); ?>
		<?php echo $form->textField($model,'idTipusLlicencia'); ?>
		<?php echo $form->error($model,'idTipusLlicencia'); ?>
	</div>
     * 
     */
    ?>
    
    <div class="row">
		<?php echo $form->labelEx($model,'idTipusLlicencia'); ?>
        <?php echo $form->dropDownList($model, 'idTipusLlicencia',
            CHtml::listData(Tipusllicencia::model()->findAll(array('order'=> 'nom')), 'idTipusLlicencia', 'nom'),
                array('prompt'=>'(Tria un tipus de llicència)'));?>
        <?php echo $form->error($model,'idTipusLlicencia'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Guardar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->